//
//  APHomeUnlockBubbleView.m
//  AqualPolo
//
//  Created by dong on 2024/5/13.
//

#import "APHomeUnlockBubbleView.h"

@implementation APHomeUnlockBubbleView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc] init];
        _imageView.image = [UIImage imageNamed:@"home_unlock_bubble"];
        [self addSubview:_imageView];
        [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
        }];
        
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = LYRGBColor(87, 61, 255);
        _titleLabel.font = [LYFont fontWithSize:10 fontName:LYFontNamepfr];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(5);
            make.bottom.equalTo(self).offset(-10);
            make.left.right.equalTo(self);
        }];
    }
    return self;
}
- (void)setBallType:(APBallType)ballType{
    _ballType = ballType;
    _titleLabel.text = [NSString stringWithFormat:@"【%@】",[BaseDataManager ballName:ballType]];
}
@end
